package com.yonyou.iuap.jxzy.controller;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import net.sf.json.JSONObject;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yonyou.iuap.base.web.BaseController;
import com.yonyou.iuap.jxzy.entity.PoundderLiver;
import com.yonyou.iuap.jxzy.service.PoundderLiverService;
import com.yonyou.iuap.mvc.constants.RequestStatusEnum;
import com.yonyou.iuap.mvc.type.JsonResponse;
import com.yonyou.iuap.mvc.type.SearchParams;

/**
 * 磅单表 
 * @author Junxiang Peng
 *
 */
@Controller
@RequestMapping(value="/jx_jx_pounddeliver_view")
public class PoundderLiverController extends BaseController{

	private Logger logger = LoggerFactory.getLogger(PoundderLiverController.class);
	
	@Autowired
	private PoundderLiverService  service;
	
	@RequestMapping(value="/list-param")
	@ResponseBody
	public Object listParam(SearchParams searchParams){
		
		Map<String, Object> map=searchParams.getSearchMap();
		List<PoundderLiver> list=new ArrayList<PoundderLiver>();
		
		JSONObject jsonObject=new JSONObject();
		try {
			PoundderLiver poundderLiver=service.selectAllParam(map);
			return this.buildSuccess(poundderLiver);
		} catch (Exception e) {
			jsonObject.put("message", "数据异常:"+e.getMessage());
			jsonObject.put("success", "error");
		}
		return jsonObject.toString();
			         
		}
		
	
}
